#include "common.h"

/****************************************************/
struct	tm	cur_time;		//current time

int	rtc_fd;			//RTC'fd

//struct	PLC_Dat plc_dat;		//DB Interface

/****************************************************/
//FuncName : Gettime
//Description : read the sys time
//Input : None
//Return : None
//SideEffect : None
/****************************************************/
void	Gettime()
{
	time_t _time;
	struct tm _tm;
	struct tm * _ptime = &_tm;
	time(&_time);
	_ptime = gmtime(&_time);		//conversion
	memcpy(&cur_time,_ptime,sizeof(struct tm));
}

/****************************************************/
//FuncName : Debug_Info
//Description : Print Some Debug information
//Input : None
//Return : None
//SideEffect : None
/****************************************************/
void	Debug_Info()
{
	printf("ERROR IN FUNCTION:--->%s----LINE--->%d\n",__FUNCTION__,__LINE__);
}

